package com.genexususa.eo.google.test.ad;

import com.genexususa.eo.google.connection.AdGroupManager;
import com.genexususa.eo.google.connection.AdsManager;
import com.genexususa.eo.google.test.Constants;

public class ConsumeCreateAds {

    public static void main(String[] args){

        /*String xml = "<GA_AdMobileImageCollection xmlns=\"Revenewtemp\">\n" +
                "\t<GA_AdMobileImage xmlns=\"Revenewtemp\">\n" +
                "\t\t<CampaignID>264186878</CampaignID>\n" +
                "\t\t<SubCampaignGxId>100</SubCampaignGxId>\n" +
                "\t\t<AdGroupId>19804759598</AdGroupId>\n" +
                "\t\t<AdGroupGxId>103</AdGroupGxId>\n" +
                "\t\t<AdId>0</AdId>\n" +
                "\t\t<AdGxId>132</AdGxId>\n" +
                "\t\t<AdStatus>E</AdStatus>\n" +
                "\t\t<Url>http://dest.com</Url>\n" +
                "\t\t<DisplayUrl>Dest.com</DisplayUrl>\n" +
                "\t\t<DevicePreference>30002</DevicePreference>\n" +
                "\t\t<Image>\n" +
                "\t\t\t<Name>My Image Name</Name>\n" +
                "\t\t\t<DataLocation>C:\\hello.jpg</DataLocation>\n" +
                "\t\t</Image>\n" +
                "\t\t<MarkupLanguages>\n" +
                "\t\t\t<MarkupLanguage>H</MarkupLanguage>\n" +
                "\t\t\t<MarkupLanguage>X</MarkupLanguage>\n" +
                "\t\t</MarkupLanguages>\n" +
                "\t\t<MobileCarriers>\n" +
                "\t\t\t<MobileCarrier>Nextel@US</MobileCarrier>\n" +
                "\t\t\t<MobileCarrier>Sprint@US</MobileCarrier>\n" +
                "\t\t</MobileCarriers>\n" +
                "\t</GA_AdMobileImage>\n" +
                "</GA_AdMobileImageCollection>\n";*/

        String xml = "<GA_AdTextCollection xmlns=\"Revenewtemp\">\n" +
                "\t<GA_AdText xmlns=\"Revenewtemp\">\n" +
                "\t\t<CampaignID>264186878</CampaignID>\n" +
                "\t\t<SubCampaignGxId>100</SubCampaignGxId>\n" +
                "\t\t<AdGroupId>19804759598</AdGroupId>\n" +
                "\t\t<AdGroupGxId>103</AdGroupGxId>\n" +
                "\t\t<AdId>0</AdId>\n" +
                "\t\t<AdGxId>132</AdGxId>\n" +
                "\t\t<AdStatus>E</AdStatus>\n" +
                "\t\t<Url>http://dest.com</Url>\n" +
                "\t\t<DisplayUrl>Dest.com</DisplayUrl>\n" +
                "\t\t<DevicePreference>30000</DevicePreference>\n" +
                "\t\t<Headline>My Text Ad</Headline>\n" +
                "\t\t<Dsc1>Description 1</Dsc1>\n" +
                "\t\t<Dsc2>Description 2</Dsc2>\n" +
                "\t</GA_AdText>\n" +
                "</GA_AdTextCollection>\n";

        AdsManager adm = new AdsManager();

        adm.SetClientId("9763056336");
        String res = adm.CreateAdText(xml);
        adm.Finalize();
        System.out.println(res);

    }
}
